home *** CD-ROM | disk | FTP | other *** search
- rem $linesize:132
- rem $title:'Application Engineer Standard Routines'
- rem $subtitle:'Open an index'
-
- ' Include the COMMON values
- rem $include:'AESHARED.BAS'
-
- sub bit.open(fl%,hn$) static
-
- ' open the header, read info and close the header
-
- aesb.fatal%=0%
-
- if fl%>15% or fl%<1% or fl%>ubound(xh%,1) or fl%<lbound(xh%,1) then
- aesb.fatal%=1
- else
- idx.nam$(fl%)=hn$
- open "r",fl%,hn$+".hdr",512
- field #fl%,32 as desc$,32 as xmast$,2 as klen$,2 as nok$,2 as nexav$
- field #fl%,70 as twit$,2 as kdel$,440 as spare$
- get #fl%,1
- mfile$=xmast$
- xh%(fl%,1)=cvi(klen$)
- xh%(fl%,2)=cvi(nok$)
- xh%(fl%,3)=cvi(nexav$)
- xh%(fl%,4)=cvi(kdel$)
- close fl%
- open "r",fl%,mfile$,xh%(fl%,1)+10
- field #fl%,xh%(fl%,1) as xk$(fl%,1),2 as xk$(fl%,2),2 as xk$(fl%,3)
- field #fl%,xh%(fl%,1)+4 as twit$,2 as xk$(fl%,4),2 as xk$(fl%,5),2 as xk$(fl%,6)
- lset xk$(fl%,1)=string$(xh%(fl%,1),0)
- for init%=2 to 6
- lset xk$(fl%,init%)=mki$(0)
- next init%
- put #fl%,xh%(fl%,3)
- end if
-
- end sub